package com.dream.keigezhushou.Activity.http.callback;

import com.dream.keigezhushou.Activity.bean.Code;
import com.google.gson.Gson;
import com.squareup.okhttp.OkHttpClient;
import com.squareup.okhttp.Response;
import com.zhy.http.okhttp.OkHttpUtils;
import com.zhy.http.okhttp.callback.Callback;

import java.io.IOException;

/**
 * Created by liuxuyang on 17/3/30.
 */

public abstract class CodeCallback extends Callback<Code> {

    @Override
    public Code parseNetworkResponse(Response response) throws IOException
    {
        String string = response.body().string();

        Code code = new Gson().fromJson(string,Code.class);

        return code;
    }

}

